<HTML>
<HEAD><TITLE>Day NL Calculation !!!</TITLE>
</HEAD>
<BODY bgcolor="white">
<SCRIPT language="javascript">
{literal}
window.name = 'displayAll';
{/literal}
</SCRIPT>
  <FONT face="arial">
		<a href="index.php">Home</a>
	<CENTER>
	<FORM name="form1" method="POST" action="{$PHP_SELF}">
	<INPUT type="hidden" name="display" value="{$display}">
	<INPUT type="hidden" name="itemIdChanged" value="1">
  Exchange: 
    <SELECT name="exchange" value="MCX" onChange="document.form1.submit();">
    {html_options selected="$selectedExchange" values="$exchangeValue" output="$exchangeValue"}
    </SELECT>

  From Date : 
    {html_select_date time="$fromDate" prefix="fromDate" start_year="-1" end_year="+1" month_format="%m" field_order="DMY" day_value_format="%02d"}
  
  Item :
    <SELECT name="itemId" onChange="document.form1.itemIdChanged.value=1;document.form1.submit();">
    {html_options selected="$currentItemId" values="$itemIdValues" output="$itemIdOptions"}
    </SELECT>
  
  Expiry Date : 
    <SELECT name="expiryDate" onChange="document.form1.itemIdChanged.value=0;document.form1.submit();"> 
    {html_options selected="$expiryDateSelected" values="$expiryDateValues" output="$expiryDateOptions"}
   </SELECT>
    <INPUT type="submit" name="submitBtn" value="Go" >
  </FORM>
  </CENTER><br />
  </FONT>
  <FONT face="arial" size=+1>
  <DIV style="width:40%;padding-left:10px;">
  	<TABLE border="1" cellSpacing="0" cellPadding="2" width="40%">
	    <TR>
	      <TH NOWRAP align="left"><FONT color='blue'>HIGH</FONT></TH>
	      <TH align="right"><FONT color='blue'>{$highPrice}</FONT></TH>
	    </TR>
	    <TR>
	      <TH NOWRAP align="left"><FONT color='red'>LOW</FONT></TH>
	      <TH align="right"><FONT color='red'>{$lowPrice}</FONT></TH>
	    </TR>
	    <TR>
	      <TH NOWRAP align="left">CLOSING</TH>
	      <TH align="right">{$closePrice}</TH>
	    </TR>
	    <TR>
	    	<TH>&nbsp;</TH>
	    	<TH>&nbsp;</TH>
	    </TR>
	    <TR>
	      <TH NOWRAP align="left">RANGE</TH>
	      <TH align="right">{$range}</TH>
	    </TR>
	  </TABLE>
	</DIV>
	<DIV style="margin-top:-130px; width:70%;float:right;padding-right:20px;">
	  <TABLE border="1" cellSpacing="0" cellPadding="2" width="90%">
	    <TR align="right">
	    	<TD>1</TD>
	    	<TD>2</TD>
	    	<TD>3</TD>
	    	<TD>4</TD>
	    	<TD>5</TD>
	    	<TD>6</TD>
	    	<TD>7</TD>
	    	<TD>8</TD>
	    	<TD>9</TD>
	    </TR>
	    <TR>
	    {section name=sec2 loop=$fixedValue }
	      {section name=sec3 loop=$fixedCalculation[sec2]}
	        <TD align="right">{$fixedCalculation[sec2][sec3]}</TD>
	      {/section}
	    {/section}
	    </TR>   
	  </TABLE>
	</DIV>
  <br />
	<DIV style="margin-top:19px;width:20%;padding-left:10px">
	  <TABLE border="1" cellSpacing="0" cellPadding="4" width="110%">
	    <TR>
	      {section name=sec1 loop=$fixedValue}
	        {if $smarty.section.sec1.rownum == 1}<TD align="right" colspan="2">&nbsp;</TD>{/if}
	        <TD align="center" colspan="2" >
	          {math equation="round(x,y)" x=$fixedValue[sec1] y=2 format="%.2f"}
	        </TD>
	      {/section}
	    </TR>   
	    <TR>
	    	<TD>UPSIDE</TD>
	    {section name=sec4 loop=$fixedValue }
	      {section name=sec5 loop=$fixedCalculation[sec4]}
	        <TH align="right">
	        	{if $upsideBlack[sec4][sec5] > 0}
	        	{math equation="round(x,y)" x=$upsideBlack[sec4][sec5] y=2 format="%.2f"}
	        	{/if}
	        </TH>
	        <TH align="right">
	        	<font color="blue">{math equation="round(x,y)" x=$upside[sec4][sec5] y=2 format="%.2f"}</font>
	        </TH>
	      {/section}
	    {/section}
	    </TR>   
	    <TR>
	    	<TD>Down</TD>
	    {section name=sec6 loop=$fixedValue}
	      {section name=sec7 loop=$fixedCalculation[sec6]}
	        <TH align="center">
	        	{if $downBlack[sec6][sec7] > 0}
	        	{math equation="round(x,y)" x=$downBlack[sec6][sec7] y=2 format="%.2f"}
	          {/if}
	        </TH>
	        <TH align="right">
	        	<font color="red">{math equation="round(x,y)" x=$down[sec6][sec7] y=2 format="%.2f"}</font>
	        </TH>
	      {/section}
	    {/section}
	    </TR>   
	  </TABLE>
	</DIV>
<!--	<DIV style="margin-top:10px;padding-left:95px;">
	  <TABLE border="1" cellSpacing="0" cellPadding="2" align="center" width="100%">
	    <TR>
	    {section name=sec8 loop=$fixedValue}
	      {section name=sec9 loop=$fixedCalculation[sec8]}
	        <TH align="center">{math equation="round(x,y)" x=$down1[sec8][sec9] y=2 format="%.2f"}</TH>
	      {/section}
	    {/section}
	    </TR>   
	  </TABLE>
	</DIV>
	<DIV style="margin-top:10px;padding-left:95px;">
	  <TABLE border="1" cellSpacing="0" cellPadding="2" align="center" width="100%">
	    <TR>
	    {section name=sec10 loop=$fixedValue}
	      {section name=sec11 loop=$fixedCalculation[sec10]}
	        <TH align="center">{math equation="round(x,y)" x=$down2[sec10][sec11] y=2 format="%.2f"}</TH>
	      {/section}
	    {/section}
	    </TR>   
	  </TABLE>
	</DIV>-->
	<br /><br />
  {if $highPrice > 0}
	<DIV style="padding-left:10px;">
		<TABLE border="1" cellSpacing="0" cellPadding="2" width="90%">
			<TR>
					<TH align="left" colspan="10">MUST BE CROSS THE TGT LEVEL THEN GO TO NEXT TGT</TH>
			</TR>
			<TR><TH colspan="10">&nbsp;</TH></TR>
			<TR>
				<TH align="center" colspan="2">BUY RANGE</TH>
				<TH align="center">S/L</TH>
				<TH align="center">&nbsp;</TH>
				<TH align="center">TGT 1</TH>
				<TH align="center">TGT 2</TH>
				<TH align="center">TGT 3</TH>
				<TH align="center">TGT 4</TH>
				<TH align="center">TGT 5</TH>
				<TH align="center">TGT 6</TH>
			</TR>
			<TR><TH colspan="10">&nbsp;</TH></TR>
			<TR>
				<TH align="right"><FONT color="blue">{math equation="round(x,y)" x=$down[0][0] y=2 format="%.2f"}</FONT></TH>
				<TH align="right"><FONT color="blue">{math equation="round(x,y)" x=$downBlack[1][0] y=2 format="%.2f"}</FONT></TH>
				<TH align="right"><FONT color="red">{math equation="round(x,y)" x=$down[1][0] y=2 format="%.2f"}</FONT></TH>
				<TH align="right">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TH>
				<TH align="right">{math equation="round(x,y)" x=$upside[0][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$upside[1][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$upside[2][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$upside[3][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$upside[4][0] y=2 format="%.2f"}</TH>
				<TH align="right">&nbsp;</TH>
			</TR>
			<TR>
				<TH align="right"><FONT color="blue">{math equation="round(x,y)" x=$down[1][0] y=2 format="%.2f"}</FONT></TH>
				<TH align="right"><FONT color="blue">{math equation="round(x,y)" x=$downBlack[2][0] y=2 format="%.2f"}</FONT></TH>
				<TH align="right"><FONT color="red">{math equation="round(x,y)" x=$down[2][0] y=2 format="%.2f"}</FONT></TH>
				<TH align="right">&nbsp;</TH>
				<TH align="right">{math equation="round(x,y)" x=$down[0][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$upside[0][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$upside[1][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$upside[2][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$upside[3][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$upside[4][0] y=2 format="%.2f"}</TH>
			</TR>
			<TR>
				<TH align="right"><FONT color="blue">{math equation="round(x,y)" x=$down[2][0] y=2 format="%.2f"}</FONT></TH>
				<TH align="right"><FONT color="blue">{math equation="round(x,y)" x=$downBlack[3][0] y=2 format="%.2f"}</FONT></TH>
				<TH align="right"><FONT color="red">{math equation="round(x,y)" x=$down[3][0] y=2 format="%.2f"}</FONT></TH>
				<TH align="right">&nbsp;</TH>
				<TH align="right">{math equation="round(x,y)" x=$down[1][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$down[0][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$upside[0][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$upside[1][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$upside[2][0] y=2 format="%.2f"}</TH>
				<TH align="right">&nbsp;</TH>
			</TR>
			
			<TR><TH colspan="10">&nbsp;</TH></TR>
			<TR>
				<TH align="center" colspan="2">SELL RANGE</TH>
				<TH align="center">S/L</TH>
			</TR>
			<TR><TH colspan="10">&nbsp;</TH></TR>
			<TR>
				<TH align="right"><FONT color="red">{math equation="round(x,y)" x=$upside[0][0] y=2 format="%.2f"}</FONT></TH>
				<TH align="right"><FONT color="red">{math equation="round(x,y)" x=$upsideBlack[1][0] y=2 format="%.2f"}</FONT></TH>
				<TH align="right"><FONT color="blue">{math equation="round(x,y)" x=$upside[1][0] y=2 format="%.2f"}</FONT></TH>
				<TH align="right">&nbsp;</TH>
				<TH align="right">{math equation="round(x,y)" x=$down[0][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$down[1][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$down[2][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$down[3][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$down[4][0] y=2 format="%.2f"}</TH>
				<TH align="right">&nbsp;</TH>
			</TR>
			<TR>
				<TH align="right"><FONT color="red">{math equation="round(x,y)" x=$upside[1][0] y=2 format="%.2f"}</FONT></TH>
				<TH align="right"><FONT color="red">{math equation="round(x,y)" x=$upsideBlack[2][0] y=2 format="%.2f"}</FONT></TH>
				<TH align="right"><FONT color="blue">{math equation="round(x,y)" x=$upside[2][0] y=2 format="%.2f"}</FONT></TH>
				<TH align="right">&nbsp;</TH>
				<TH align="right">{math equation="round(x,y)" x=$upside[0][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$down[0][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$down[1][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$down[2][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$down[3][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$down[4][0] y=2 format="%.2f"}</TH>
			</TR>
			<TR>
				<TH align="right"><FONT color="red">{math equation="round(x,y)" x=$upside[2][0] y=2 format="%.2f"}</FONT></TH>
				<TH align="right"><FONT color="red">{math equation="round(x,y)" x=$upsideBlack[3][0] y=2 format="%.2f"}</FONT></TH>
				<TH align="right"><FONT color="blue">{math equation="round(x,y)" x=$upside[3][0] y=2 format="%.2f"}</FONT></TH>
				<TH align="right">&nbsp;</TH>
				<TH align="right">{math equation="round(x,y)" x=$upside[1][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$upside[0][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$down[0][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$down[1][0] y=2 format="%.2f"}</TH>
				<TH align="right">{math equation="round(x,y)" x=$down[2][0] y=2 format="%.2f"}</TH>
				<TH align="right">&nbsp;</TH>
			</TR>
		</TABLE>
  </DIV>
  {/if}
	</FONT>
</BODY>
</HTML>